package com.smyh.bean.Enum;

public enum PhaseType {
	
	A(1,"A"),B(2,"B"),C(3,"C"),O(0,"0");
	
	private int index;
	private String name;
	
	
	 PhaseType(Integer index,String name) {
		 this.setIndex(index);
		 this.setName(name);
	}
	 
	 public static String getPhaseName(Integer index){
		 PhaseType[] values = PhaseType.values();
		 for (PhaseType phaseType : values) {
			 if(phaseType.getIndex() == index){
				 return phaseType.getName();
			 }
		}
		return "";
	 }
	 
	public void setIndex(int index) {
		this.index = index;
	}
	public int getIndex() {
		return index;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
}
